package jy.game.components.battle;


import java.util.List;

import jy.game.BasePojo;
import jy.game.components.story.JyStoryAction;
import wx.xml.simpleframework.xml.Attribute;
import wx.xml.simpleframework.xml.ElementList;
import wx.xml.simpleframework.xml.Root;

@Root(name = "battle")
public class JyBattle extends BasePojo {
    @Attribute(name = "key") public          String  key;
    @Attribute(name = "map") public          String  Map;
    @Attribute(name = "mapkey") public       String  mapKey;
    @Attribute(name = "music") public        String  music;
    @Attribute(name = "must") public         String  mustValue;
    @Attribute(name = "forceAI") public      boolean ForceAI;
    @Attribute(name = "bonus") public        boolean Bonus = true;
    @Attribute(name = "trainingmode") public boolean isTrainingMode;

    @ElementList(name = "roles") public  List<JyBattleRole>  roles;
    @ElementList(name = "story") public  List<JyStoryAction> storyActions;
    @ElementList(name = "random") public List<JyBattleRole>  randomBattleRoles;

    public List<JyBattleRole> Roles_IsDead;
    public List<Integer>      Team1_Roles_IsDeadX;
    public List<Integer>      Team1_Roles_IsDeadY;
    public List<Integer>      Team2_Roles_IsDeadX;
    public List<Integer>      Team2_Roles_IsDeadY;

    // (get) Token: 0x0600039F RID: 927 RVA: 0x00003FBE File Offset: 0x000021BE
    @Override public /*override*/ String getPK() {
        {
            return this.key;
        }
    }

    // (get) Token: 0x060003A0 RID: 928 RVA: 0x00029C68 File Offset: 0x00027E68
    public String[] mustKeys() {
        {
            if (this.mustValue != null) {
                return (this.mustValue.split("#"));
            }
            return null;
        }
    }

    // (get) Token: 0x060003A1 RID: 929 RVA: 0x00003FC6 File Offset: 0x000021C6
    //[XmlIgnore]
    public boolean IsArena() {
        {
            return this.key.startsWith("arena");
        }
    }
}
